//
//  MineCell.swift
//  ShareUmbrella
//
//  Created by duanmingyang on 2017/9/16.
//  Copyright © 2017年 尧尚信息科技. All rights reserved.
//

import UIKit

class MineCell: UITableViewCell {
    let kScreenHeight = UIScreen.main.bounds.size.height
    let kScreenWidth = UIScreen.main.bounds.size.width
    
    var titleLabel:UILabel?
    var valueLeb:UILabel?
    var nextIcon:UIImageView?
    var line:UIView?
    
    required init?(coder aDecoder:NSCoder) {
        super.init(coder: aDecoder)
    }
    
    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = UIColor.white
        self.setUpUI();
    }
    
    func setUpUI() {
        
        //文字信息
        titleLabel = UILabel.init()
        titleLabel?.backgroundColor = UIColor.clear;
        titleLabel?.frame = CGRect(x:15, y:0, width:200, height:44)
        titleLabel?.text = ""
        titleLabel?.textColor = RGB(r: 74, 74, 94)
        titleLabel?.font = UIFont.systemFont(ofSize: 16)
        addSubview(self.titleLabel!)
        
        valueLeb = UILabel.init()
        valueLeb?.frame = CGRect(x:kScreenWidth-240, y:0, width:200, height:44)
        valueLeb?.textAlignment = NSTextAlignment.right
        valueLeb?.font = UIFont.systemFont(ofSize: 13)
        valueLeb?.textColor = RGB(r: 74, 74, 94)
        addSubview(self.valueLeb!)
        
        
        nextIcon = UIImageView.init(frame: CGRect(x: kScreenWidth-30, y: 11, width: 20, height: 20))
        nextIcon?.image = UIImage.init(named: "下一步")
        addSubview(nextIcon!)
        
        line = UIView.init(frame: CGRect(x: 15, y: 43.5, width: kScreenWidth, height: 0.5))
        line?.backgroundColor = RGB(r: 230, 230, 230)
        addSubview(line!)
    }
    
    //RGB
    func RGB(r:CGFloat,_ g:CGFloat,_ b:CGFloat) -> UIColor{
        return UIColor(red: (r)/255.0, green: (g)/255.0, blue: (b)/255.0, alpha: 1.0)
    }

}
